Make sure all three BIN files are the same size in bytes. If not,
then the input .PCX's were not the same physical size (in pixels) The
BIN and PCX files can and should be deleted.
6) This is where you'll now need your file conversion or paint program.
Since I prefer Graphics Workshop, I describe it, although other
programs may work as well.
7) Bring in RGB.BMP (the Windows Paint works well for this) and check
that it is not skewed (if it is, see Skewing, below for corrective
action.
8) Flip the RGB.BMP vertically and save it. Don't ask why, but for
some strange reason, Microsoft wants their BMP files to read from the
end, not the beginning.
9) If you'll be using the BMP output with Windows and a proper 24-Bit
video card, you'll have a color image.
10) Use your conversion program to convert it to a .GIF, .PCX or whatever
format you choose and reduce to 256 colors. Most photos will need
to be dithered to look right. The Stucki dither provides the best
dithering. (This is one of the areas that Graphics Workshop shines.)
Do note that some scanners/paint programs dump their PCX files in a
negative image format (like a photographic negative) which can be
changed by using Graphics Workshop.
11) If the colors do not appear right, some viewers, such as VPIC will
allow color adjustments. Otherwise, rescan the R.PCX, G.PCX, and
B.PCX making adjustments to the brightness to compensate. After a
little practice, you'll get the hang of it.
12) Enjoy your color image.
FLAT-BED SCANNER METHOD:
1) Place the photo on the scanner glass against the side. Use a piece
of tape to secure it. DO NOT put the tape on the glass.
2) Place the red filter under the photo and scan. Save as R.PCX. If
.PCX is not an output choice, save as your scanner output and convert
to R.PCX using a paint, VPIC, or Graphics Workshop. After viewing
the output (RGB.BMP) you may find you need a double layer of filter.
Remove the red filter from the scanner.
3) Repeat for the green filter (save as G.PCX) and the blue filter (save
as B.PCX).
4) Use the general method (above) to finish the picture.
HAND-HELD SCANNER METHOD:
1) Place the photo on the scanner guide.
2) Place the red filter on the scanner guide.
3) Place the scanner into the scanner guide and scan to produce a R.PCX.
4) Replace the red filter with the green filter and rescan exactly.
Repeat for the blue filter.
5) Use the general method (above) to finish the picture.
PROBLEMS:
A few things can go wrong or at least have the appearance of being wrong.
For the most part the correction is fairly simple.
Skewing:
If the image appears to be skewed (i.e.: a line running from one corner
diagonally down the image to the opposite corner. The image will appear to be
split on each side of the line. This is cause by variations in scanner
output. The cure is easy. Try scanning as a .TIF or other output and
convert to a .PCX using Graphics Workshop, VPIC, or a paint program. If that
fails, scan using a multiple of screen width for the width of the image
(i.e.: 640 wide, 320 wide, 160 wide or 80 wide).
Color Abberations:
These are simple to cure. Change the brightness setting for the color
that is causing the problem. A little experimentation will provide the best
setting. If that seems like too much trouble, various viewing programs (VPIC
for example) allow the color (red, green, blue) to be adjusted as well as
modifying the contrast and brightness.
MISCELLANEOUS BACKGROUND, ACKNOWLEDGEMENTS, AND OTHER STUFF:
Background:
This program incorporates techniques from both the graphics programmer's
world and the printing world. When a printer makes a full color printing,
the original image is turned into negative using filters to produce a red,
yellow, blue, and a black negative. These are then used to produce the
printing plates and thus a color print.
This program uses the same concept. But instead of producing a negative,
a 256 grey-scale .PCX is used to provde the relative strength of red, green,
and blue components of a 24-bit full color image.
Acknowledgements:
Even though we've never met or spoken, I am deeply indebted to Steve Rimmer for his books BITMAPPED GRAPHICS, and SUPERCHARGED BITMAPPED GRAPHICS and for his program GRAPHICS WORKSHOP. He has also written DESKTOP PAINT256.
If he hadn't written them, I wouldn't have had a clue as to how to write this program. If you are into graphics, these two books should definitely be on
your bookshelf and these two programs should be in your repretoire.
Miscellaneous Stuff:
This program was written using Borland C++ (not Turbo). The source code
is included. If you have any improvements or suggestions, please send them